﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SurveySystem.Core
{
    public enum GroupMemberRole
    {
        NotMember = 0,
        Member,
        Admin,
        Owner,
        Requesting,
    }

    public enum SurveyType
    {
        Choice,
        MultiChoice,
        Free
    }

    public class GroupOfUser
    {
        public int GroupId { get; set; }
        public string GroupName { get; set; }
        public GroupMemberRole UserRole { get; set; }

        public GroupOfUser(Member m)
        {
            GroupName = m.Group.name;
            UserRole = (GroupMemberRole) m.role;
            GroupId = m.groupId;
        }

        /// <summary>
        /// If not member
        /// </summary>
        /// <param name="g"></param>
        public GroupOfUser(Group g)
        {
            GroupName = g.name;
            UserRole = GroupMemberRole.NotMember;
            GroupId = g.id;
        }
        
    }

 
}
